Optimal. Leaf size=115 \[ -\frac {2 d x^2 \sqrt {d^2-e^2 x^2}}{3 e}-\frac {1}{4} x^3 \sqrt {d^2-e^2 x^2}-\frac {d^2 (32 d+21 e x) \sqrt {d^2-e^2 x^2}}{24 e^3}+\frac {7 d^4 \tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )}{8 e^3} \]
________________________________________________________________________________________
Rubi [A] time = 0.15, antiderivative size = 115, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {1809, 833, 780, 217, 203} \begin {gather*} -\frac {d^2 (32 d+21 e x) \sqrt {d^2-e^2 x^2}}{24 e^3}-\frac {2 d x^2 \sqrt {d^2-e^2 x^2}}{3 e}-\frac {1}{4} x^3 \sqrt {d^2-e^2 x^2}+\frac {7 d^4 \tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )}{8 e^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 217
Rule 780
Rule 833
Rule 1809
Rubi steps
\begin {align*} \int \frac {x^2 (d+e x)^2}{\sqrt {d^2-e^2 x^2}} \, dx &=-\frac {1}{4} x^3 \sqrt {d^2-e^2 x^2}-\frac {\int \frac {x^2 \left (-7 d^2 e^2-8 d e^3 x\right )}{\sqrt {d^2-e^2 x^2}} \, dx}{4 e^2}\\ &=-\frac {2 d x^2 \sqrt {d^2-e^2 x^2}}{3 e}-\frac {1}{4} x^3 \sqrt {d^2-e^2 x^2}+\frac {\int \frac {x \left (16 d^3 e^3+21 d^2 e^4 x\right )}{\sqrt {d^2-e^2 x^2}} \, dx}{12 e^4}\\ &=-\frac {2 d x^2 \sqrt {d^2-e^2 x^2}}{3 e}-\frac {1}{4} x^3 \sqrt {d^2-e^2 x^2}-\frac {d^2 (32 d+21 e x) \sqrt {d^2-e^2 x^2}}{24 e^3}+\frac {\left (7 d^4\right ) \int \frac {1}{\sqrt {d^2-e^2 x^2}} \, dx}{8 e^2}\\ &=-\frac {2 d x^2 \sqrt {d^2-e^2 x^2}}{3 e}-\frac {1}{4} x^3 \sqrt {d^2-e^2 x^2}-\frac {d^2 (32 d+21 e x) \sqrt {d^2-e^2 x^2}}{24 e^3}+\frac {\left (7 d^4\right ) \operatorname {Subst}\left (\int \frac {1}{1+e^2 x^2} \, dx,x,\frac {x}{\sqrt {d^2-e^2 x^2}}\right )}{8 e^2}\\ &=-\frac {2 d x^2 \sqrt {d^2-e^2 x^2}}{3 e}-\frac {1}{4} x^3 \sqrt {d^2-e^2 x^2}-\frac {d^2 (32 d+21 e x) \sqrt {d^2-e^2 x^2}}{24 e^3}+\frac {7 d^4 \tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )}{8 e^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 81, normalized size = 0.70 \begin {gather*} \frac {21 d^4 \tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )-\sqrt {d^2-e^2 x^2} \left (32 d^3+21 d^2 e x+16 d e^2 x^2+6 e^3 x^3\right )}{24 e^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.39, size = 103, normalized size = 0.90 \begin {gather*} \frac {7 d^4 \sqrt {-e^2} \log \left (\sqrt {d^2-e^2 x^2}-\sqrt {-e^2} x\right )}{8 e^4}+\frac {\sqrt {d^2-e^2 x^2} \left (-32 d^3-21 d^2 e x-16 d e^2 x^2-6 e^3 x^3\right )}{24 e^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.40, size = 83, normalized size = 0.72 \begin {gather*} -\frac {42 \, d^{4} \arctan \left (-\frac {d - \sqrt {-e^{2} x^{2} + d^{2}}}{e x}\right ) + {\left (6 \, e^{3} x^{3} + 16 \, d e^{2} x^{2} + 21 \, d^{2} e x + 32 \, d^{3}\right )} \sqrt {-e^{2} x^{2} + d^{2}}}{24 \, e^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.25, size = 63, normalized size = 0.55 \begin {gather*} \frac {7}{8} \, d^{4} \arcsin \left (\frac {x e}{d}\right ) e^{\left (-3\right )} \mathrm {sgn}\relax (d) - \frac {1}{24} \, {\left (32 \, d^{3} e^{\left (-3\right )} + {\left (21 \, d^{2} e^{\left (-2\right )} + 2 \, {\left (8 \, d e^{\left (-1\right )} + 3 \, x\right )} x\right )} x\right )} \sqrt {-x^{2} e^{2} + d^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 124, normalized size = 1.08 \begin {gather*} \frac {7 d^{4} \arctan \left (\frac {\sqrt {e^{2}}\, x}{\sqrt {-e^{2} x^{2}+d^{2}}}\right )}{8 \sqrt {e^{2}}\, e^{2}}-\frac {\sqrt {-e^{2} x^{2}+d^{2}}\, x^{3}}{4}-\frac {2 \sqrt {-e^{2} x^{2}+d^{2}}\, d \,x^{2}}{3 e}-\frac {7 \sqrt {-e^{2} x^{2}+d^{2}}\, d^{2} x}{8 e^{2}}-\frac {4 \sqrt {-e^{2} x^{2}+d^{2}}\, d^{3}}{3 e^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.97, size = 103, normalized size = 0.90 \begin {gather*} -\frac {1}{4} \, \sqrt {-e^{2} x^{2} + d^{2}} x^{3} - \frac {2 \, \sqrt {-e^{2} x^{2} + d^{2}} d x^{2}}{3 \, e} + \frac {7 \, d^{4} \arcsin \left (\frac {e x}{d}\right )}{8 \, e^{3}} - \frac {7 \, \sqrt {-e^{2} x^{2} + d^{2}} d^{2} x}{8 \, e^{2}} - \frac {4 \, \sqrt {-e^{2} x^{2} + d^{2}} d^{3}}{3 \, e^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {x^2\,{\left (d+e\,x\right )}^2}{\sqrt {d^2-e^2\,x^2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [C] time = 9.33, size = 386, normalized size = 3.36 \begin {gather*} d^{2} \left (\begin {cases} - \frac {i d^{2} \operatorname {acosh}{\left (\frac {e x}{d} \right )}}{2 e^{3}} - \frac {i d x \sqrt {-1 + \frac {e^{2} x^{2}}{d^{2}}}}{2 e^{2}} & \text {for}\: \left |{\frac {e^{2} x^{2}}{d^{2}}}\right | > 1 \\\frac {d^{2} \operatorname {asin}{\left (\frac {e x}{d} \right )}}{2 e^{3}} - \frac {d x}{2 e^{2} \sqrt {1 - \frac {e^{2} x^{2}}{d^{2}}}} + \frac {x^{3}}{2 d \sqrt {1 - \frac {e^{2} x^{2}}{d^{2}}}} & \text {otherwise} \end {cases}\right ) + 2 d e \left (\begin {cases} - \frac {2 d^{2} \sqrt {d^{2} - e^{2} x^{2}}}{3 e^{4}} - \frac {x^{2} \sqrt {d^{2} - e^{2} x^{2}}}{3 e^{2}} & \text {for}\: e \neq 0 \\\frac {x^{4}}{4 \sqrt {d^{2}}} & \text {otherwise} \end {cases}\right ) + e^{2} \left (\begin {cases} - \frac {3 i d^{4} \operatorname {acosh}{\left (\frac {e x}{d} \right )}}{8 e^{5}} + \frac {3 i d^{3} x}{8 e^{4} \sqrt {-1 + \frac {e^{2} x^{2}}{d^{2}}}} - \frac {i d x^{3}}{8 e^{2} \sqrt {-1 + \frac {e^{2} x^{2}}{d^{2}}}} - \frac {i x^{5}}{4 d \sqrt {-1 + \frac {e^{2} x^{2}}{d^{2}}}} & \text {for}\: \left |{\frac {e^{2} x^{2}}{d^{2}}}\right | > 1 \\\frac {3 d^{4} \operatorname {asin}{\left (\frac {e x}{d} \right )}}{8 e^{5}} - \frac {3 d^{3} x}{8 e^{4} \sqrt {1 - \frac {e^{2} x^{2}}{d^{2}}}} + \frac {d x^{3}}{8 e^{2} \sqrt {1 - \frac {e^{2} x^{2}}{d^{2}}}} + \frac {x^{5}}{4 d \sqrt {1 - \frac {e^{2} x^{2}}{d^{2}}}} & \text {otherwise} \end {cases}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________